<template>
  <div>测试组件计数器{{ modelValue }}</div>
  <button @click="updateCount">+1</button>
</template>
<script>
export default {
  name: 'CartTest',
  props: {
    modelValue: {
      type: Number
    }
  },
  emits: ['update:modelValue'],
  setup(props, { emit }) {
    console.log(props.modelValue)
    emit('update:modelValue', props.modelValue + 1)
  }
}
</script>
